package com.ruoyi.manager.service.impl;

import com.ruoyi.manager.mapper.ITeachAnalysisMapper;
import com.ruoyi.manager.service.ITeachAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author 李红
 * @version 1.0
 * @Description TODO
 * @createTime 2021年09月05日 15:58:00
 */
@Service
public class TeacherAnalysisImpl implements ITeachAnalysisService {

    @Autowired
    private ITeachAnalysisMapper teachAnalysisMapper;

    @Override
    public List<Map<String, Object>> listClassesInfo()
    {
        return teachAnalysisMapper.listClassesInfo();
    }

    @Override
    public Map<String, Object> exInfo() {
        //核心作业完成率
        Map<String,Object> map1 = teachAnalysisMapper.getCoreExCompleteRate();
        //核心作业提交率
        Map<String,Object> map2 = teachAnalysisMapper.getCoreExCommitRate();
        //完成率低于40%占比
        Map<String,Object> map3 = teachAnalysisMapper.getCoreExLt40Rate();
        //完成率高于80%占比
        Map<String,Object> map4 = teachAnalysisMapper.getCoreExGt80Rate();
        map1.putAll(map2);
        map1.putAll(map3);
        map1.putAll(map4);
        return map1;
    }

    @Override
    public List<Map<String, Object>> listCompleteRateSubmitRate() {
        return teachAnalysisMapper.listCompleteRateSubmitRate();
    }

    @Override
    public List<Map<String, Object>> listClassesavg()
    {
        return teachAnalysisMapper.listClassesavg();
    }

    @Override
    public Map<String,Object> listStudentLevelCount()
    {
        return teachAnalysisMapper.listStudentLevelCount();
    }

    @Override
    public List<Map<String, Object>> listStudentCompleteRatelow40() {
        return teachAnalysisMapper.listStudentCompleteRatelow40();
    }

    @Override
    public Map<String,Object> findClassessumandavg() {
        return teachAnalysisMapper.findClassessumandavg();
    }

    @Override
    public List<Map<String, Object>> listAssessSum() {
        return teachAnalysisMapper.listAssessSum();
    }

    @Override
    public List<Map<String,Object>> listMasterCount(){
        return teachAnalysisMapper.listMasterCount();
    };

    @Override
    public List<Map<String,Object>> listStudentsEmployCityAndSalary(){
        return teachAnalysisMapper.listStudentsEmployCityAndSalary();
    };

    @Override
    public List<Map<String,Object>>  listStudentsLocation(){
        return teachAnalysisMapper.listStudentsLocation();
    };
}
